import request from '@/utils/request'

export function findAll(data) {
  return request({
    url: '/orderRefund/page',
    method: 'get',
    params:data
  })
}

export function deleteOrderRefund(id) {
  return request({
    url: '/orderRefund/deleteByIdRefund',
    method: 'get',
    params: {
      id: id
    }
  })
}

export function deleteOrderRefundBatch(ids) {
  return request({
    url: '/orderRefund/deleteBatchRefund',
    method: 'get',
    params: {
      ids:ids.join(',')   /* 数组转换成字符串 */
    }
  })
}

export function addOrderRefund(orderRefund) {
  return request({
    url: '/orderRefund/addRefund',
    method: 'post',
    data: orderRefund
  })
}

export function updateOrderRefund(orderRefund) {
  return request({
    url: '/orderRefund/updateRefund',
    method: 'post',
    data: orderRefund
  })
}
